﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;
using DTO;

namespace QuanLySach
{
    public partial class frmQLKhachHang : Form
    {
        public frmQLKhachHang()
        {
            InitializeComponent();
        }

        private void frmQLKhachHang_Load(object sender, EventArgs e)
        {
            try
            {
                KhachHangBUS khachhangBUS = new KhachHangBUS();
                List<KhachHangDTO> ListKhachHang = khachhangBUS.LayDanhSachKhachHangBUS();
                dgvQLKhachHang.DataSource = ListKhachHang;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Loi" + ex, "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
            btnCapNhat.Enabled = true;
        }
        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
